home *** CD-ROM | disk | FTP | other *** search
- --= SID = SIMTEL20 Ada Software Repository Item Description File = SID =--
- -- UNIT NAME : COUNT_OF_ADA_STATEMENTS
- -- VERSION : 1.0
- -- REVIEW CODE :
- -- DDN ADDRESS : WWHITAKER@ECLB
- -- AUTHOR : W. A. Whitaker, WIS JPMO
- -- COPYRIGHT :
- -- DATE CREATED : 3 MAR 84
- -- DATE RELEASED : 15 JAN 85
- -- DATE LAST UPDATED : 3 MAR 84
- -- LOCATION : ASR
- -- ENVIRONMENT :
- --= CLASSIFICATION ===============================================--
- -- CATEGORY LEVEL 1 : PROGRAMMING TOOLS
- -- CATEGORY LEVEL 2 : Count of Ada Statements
- -- CATEGORY LEVEL 3 :
- -- CATEGORY LEVEL 4 :
- -- KEYWORD : Source analysis
- -- KEYWORD : Quantity
- -- KEYWORD : Statements
- -- INDEX : Source Analysis
- -- INDEX : Analysis, Source
- -- INDEX : Quantity
- -- INDEX : Statements
- -- INDEX : CAS
- -- TAXONOMY :
- -- DEPENDENCIES :
- -- SEE ALSO :
- --= FILE LISTING ===============================================--
- -- FILE SPECS : PD:<ADA.COMPONENTS>CAS2.*
- -- DIRECTORY DISPLAY :
- -- Directory PD:<ADA.TOOLS>
- -- File Name Byte Count Line Count
- -- --------------- ---------- ----------
- -- CAS.ADA 8465 226
- -- CAS.PRO 2470 62
- -- =============== ========== ==========
- -- 2 Files 10935 288
- --= ABSTRACT ===============================================--
- -- This function calculates the "STATEMENTS" of a valid Ada
- -- fragment specified by a FILE_NAME string parameter. It need not be a
- -- complete compilation unit but it should have closed all open
- -- parentheses and string brackets. The number of STATEMENTS of code is
- -- returned as an INTEGER.
- --
- -- The Ada statement is defined by a semicolon terminator outside
- -- of comments, parentheses, or string or character literals. This
- -- definition is insensitive to formatting or layout of the source.
- --
- -- There are exotic cases for which this will misestimate the
- -- count but we have never encountered one in real code.
- --
- -- This copy of the function is embedded in a test and driver
- -- program. Running the program on its own source file should give The
- -- driver has an additional feature of correcting for the common error of
- -- leaving out the extension on a file name. The nature of this
- -- extension is system dependent and a ".TXT" is used.
- --= REVISION HISTORY ===============================================--
- --
- --
- -- DATE VERSION AUTHOR HISTORY
- -- 19850115 1.0 W Whitaker Initial Release
- --
- --= RELEASE NOTICE ===============================================--
- --
- -- This software is released to the Public Domain (note:
- -- software released to the Public Domain is not subject
- -- to copyright protection).
- --
- --= DISCLAIMER ===============================================--
- -- This software and its documentation are provided "AS IS" and
- -- without any expressed or implied warranties whatsoever. No warranties
- -- as to performance, merchantability, or fitness for a particular
- -- purpose exist.
- -- The user is advised to test the software thoroughly before
- -- relying on it. The user must assume the entire risk and liability of
- -- using this software. In no event shall any person or organization of
- -- people be held responsible for any direct, indirect, consequential or
- -- inconsequential damages or lost profits.
- --======================================================================--
-